<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
 插件菜单
*/
defined('BY_JYA') or exit('error');
list($basicname)=$arguments;
// 是主应用时的菜单
$menus1=array(
		array('title'=>'平台概况','icon'=>'fa-home','url'=>'jy_quan/index/','child'=>array(
			array('title'=>'接龙平台','child'=>array(
				array('url'=>'jy_quan/index/','title'=>'平台概况'),
			)),
			array('title'=>'平台学院','child'=>array(
				array('url'=>'jy_quan/notice/','title'=>'主题列表'),
			)),
			array('title'=>'平台消息管理','child'=>array(
				array('url'=>'jy_quan/message/liuyan/','title'=>'留言消息'),
				array('url'=>'jy_quan/message/tousu/','title'=>'投诉建议'),
			)),
		)),
		array('title'=>'接龙主题','icon'=>'fa-home','url'=>'jy_quan/item/list/type=0','child'=>array(
			array('title'=>'审核帖子','child'=>array(
				array('url'=>'jy_quan/item/list/nocheck=1','title'=>'待审核列'),
				array('url'=>'jy_quan/msglog/list/nocheck=1','title'=>'待审核留言'),
			)),
			array('title'=>'圈主帖子','child'=>array(
				array('url'=>'jy_quan/bossitem/list/','title'=>'帖子列表'),
			)),
			array('title'=>'点赞主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=8','title'=>'信息主题'),
				array('url'=>'jy_quan/sharelog/list/type=8','title'=>'接龙记录'),
				array('url'=>'jy_quan/msglog/list/type=8','title'=>'留言记录'),
			)),
			array('title'=>'供求主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=7','title'=>'信息主题'),
				array('url'=>'jy_quan/sharelog/list/type=7','title'=>'接龙记录'),
				array('url'=>'jy_quan/msglog/list/type=7','title'=>'留言记录'),
			)),
			array('title'=>'互动主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=0','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=0','title'=>'接龙记录'),
				array('url'=>'jy_quan/msglog/list/type=0','title'=>'留言记录'),
			)),
			array('title'=>'拼团主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=1','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=1','title'=>'接龙记录'),
				array('url'=>'jy_quan/msglog/list/type=1','title'=>'留言记录'),
				array('url'=>'jy_quan/feelog/list/type=1','title'=>'购买记录'),
			)),
			array('title'=>'发红包主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=2','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=2','title'=>'接龙记录'),
				array('url'=>'jy_quan/msglog/list/type=2','title'=>'留言记录'),
				array('url'=>'jy_quan/redlog/','title'=>'红包记录'),
			)),
			array('title'=>'报名主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=3','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=3','title'=>'接龙记录'),
				array('url'=>'jy_quan/msglog/list/type=3','title'=>'留言记录'),
				array('url'=>'jy_quan/formlog/list/type=3','title'=>'报名记录'),
			)),
			array('title'=>'阅读主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=4','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=4','title'=>'接龙记录'),
				array('url'=>'jy_quan/msglog/list/type=4','title'=>'留言记录'),
			)),
			array('title'=>'评选主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=5','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=5','title'=>'接龙记录'),
				array('url'=>'jy_quan/msglog/list/type=5','title'=>'留言记录'),
				array('url'=>'jy_quan/formlog/list/type=5','title'=>'评选记录'),
			)),
			array('title'=>'费用主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=6','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=6','title'=>'接龙记录'),
				array('url'=>'jy_quan/msglog/list/type=6','title'=>'留言记录'),
				array('url'=>'jy_quan/feelog/list/type=6','title'=>'付费记录'),
			)),
		)),
		array('title'=>'圈管理','icon'=>'fa-users','url'=>'jy_quan/sns/','child'=>array(
			array('title'=>'圈列表','child'=>array(
				array('url'=>'jy_quan/sns/','title'=>'圈列表'),
			)),
            array('title'=>'圈主列表','child'=>array(
                array('url'=>'jy_quan/boss/','title'=>'圈主列表'),
            )),
            array('title'=>'圈主收益','child'=>array(
                array('url'=>'jy_quan/commission/','title'=>'佣金管理'),
                array('url'=>'jy_quan/balance/','title'=>'结算管理'),
            )),
		)),
		array('title'=>'用户中心','icon'=>'fa-users','url'=>'jy_quan/member/','child'=>array(
			array('title'=>'用户管理','child'=>array(
				array('url'=>'jy_quan/member/','title'=>'用户列表'),
				array('url'=>'jy_quan/member_group/','title'=>'用户等级'),
			)),
			array('title'=>'商户小店管理','child'=>array(
				array('url'=>'jy_merch/index/','title'=>'商户小店列表'),
			)),
		)),
		array('title'=>'接龙记录','icon'=>'fa-users','url'=>'jy_quan/sharelog/list/','child'=>array(
			array('title'=>'接龙记录','child'=>array(
				array('url'=>'jy_quan/sharelog/list/','title'=>'接龙记录'),
				array('url'=>'jy_quan/feelog/list/','title'=>'付费记录'),
				array('url'=>'core/member.creditlog/','title'=>'积分余额记录'),
			)),
		)),
		array('title'=>'会员订单','icon'=>'fa-users','url'=>'jy_quan/viporder/list/','child'=>array(
			array('title'=>'会员订单','child'=>array(
				array('url'=>'/viporder/list/','title'=>'待支付'),
				array('url'=>'/viporder/ok/','title'=>'已支付'),
				array('url'=>'/viporder/no/','title'=>'已取消'),
			)),
		)),
		array('title'=>'提现管理','icon'=>'fa-users','url'=>'core/member.tixian/','child'=>array(
			array('title'=>'提现管理','child'=>array(
				array('url'=>'core/member.tixian/','title'=>'余额提现列表'),
				array('url'=>'core/member.red_pack/list/','title'=>'余额红包列表'),
				array('url'=>'core/member.red_pack/outlog/','title'=>'余额红包提现'),
			)),
		)),
		array('title'=>'应用中心','isplugin'=>1,'icon'=>'fa-users','url'=>'jy_quan/plugins/','child'=>array(
			array('title'=>'应用管理','child'=>array(
				array('url'=>'jy_quan/plugins/','title'=>'应用列表'),
			)),
		)),
		array('title'=>'平台设置','icon'=>'fa-gear','url'=>'jy_quan/setting/','child'=>array(
			array('title'=>'系统设置','child'=>array(
				array('url'=>'jy_quan/setting/','title'=>'基本设置'),
				array('url'=>'jy_quan/xieyi/','title'=>'平台协议')
			)),
			array('title'=>'入口管理','child'=>array(
				array('url'=>'jy_quan/basic.module_home/cover/ac=index&type=3','title'=>'平台入口'),
				array('url'=>'jy_quan/basic.module_home/cover/ac=myhome&type=3','title'=>'会员入口'),
			)),
		)),
);
// 辅助应用时的菜单
$menus2=array(
	array(
	'title'=>'应用','isplugin'=>0,'icon'=>'fa-users','url'=>'index//basicname='.$basicname,'child'=>array(
		array('title'=>'接龙平台','child'=>array(
				array('url'=>'jy_quan/index/','title'=>'平台概况'),
		)),
		array('title'=>'系统设置','child'=>array(
				array('url'=>'jy_quan/setting/','title'=>'基本设置'),
			)),
			array('title'=>'入口管理','child'=>array(
				array('url'=>'jy_quan/basic.module_home/cover/ac=index&type=3','title'=>'平台入口'),
				array('url'=>'jy_quan/basic.module_home/cover/ac=myhome&type=3','title'=>'会员入口'),
			)),
		array('title'=>'平台消息管理','child'=>array(
				array('url'=>'jy_quan/message/liuyan/','title'=>'留言消息'),
				array('url'=>'jy_quan/message/tousu/','title'=>'投诉建议'),
			)),
		array('title'=>'平台公告','child'=>array(
				array('url'=>'jy_quan/notice/','title'=>'公告列表'),
				array('url'=>'jy_quan/notice_group/','title'=>'公告分类'),
		)),
		array('title'=>'互动主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=0','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=0','title'=>'转发记录'),
				array('url'=>'jy_quan/msglog/list/type=0','title'=>'留言记录'),
			)),
			array('title'=>'拼团主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=1','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=1','title'=>'转发记录'),
				array('url'=>'jy_quan/msglog/list/type=1','title'=>'留言记录'),
				array('url'=>'jy_quan/msglog/list/type=1','title'=>'留言记录'),
			)),
			array('title'=>'发红包主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=2','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=2','title'=>'转发记录'),
				array('url'=>'jy_quan/msglog/list/type=2','title'=>'留言记录'),
			)),
			array('title'=>'报名主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=3','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=3','title'=>'转发记录'),
				array('url'=>'jy_quan/msglog/list/type=3','title'=>'留言记录'),
				array('url'=>'jy_quan/formlog/list/type=3','title'=>'报名记录'),
			)),
			array('title'=>'阅读主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=4','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=4','title'=>'转发记录'),
				array('url'=>'jy_quan/msglog/list/type=4','title'=>'留言记录'),
			)),
			array('title'=>'评选主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=5','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=5','title'=>'转发记录'),
				array('url'=>'jy_quan/msglog/list/type=5','title'=>'留言记录'),
				array('url'=>'jy_quan/formlog/list/type=3','title'=>'评选记录'),
			)),
			array('title'=>'费用主题','child'=>array(
				array('url'=>'jy_quan/item/list/type=6','title'=>'接龙主题'),
				array('url'=>'jy_quan/sharelog/list/type=6','title'=>'转发记录'),
				array('url'=>'jy_quan/msglog/list/type=6','title'=>'留言记录'),
				array('url'=>'jy_quan/feelog/list/type=6','title'=>'付费记录'),
			)),
	))
);

// 小应用可以不设置主菜单
if(empty($basicname)){
	$menus =$menus1?$menus1:$menus2;
	return $menus ;
}else{
	if (method_exists($this->plugin($basicname),'getmenus')){
		$basicmens = $this->plugin($basicname)->getmenus();
		if(!empty($basicmens)){
			foreach($basicmens as &$v){
				if($v['isplugin'] == 1){
					$v=$menus2[0];
				}
			}
		}
		return $basicmens;
	}
}

